POV-Ray : Newsgroups : povray.general : Read data and draw sphere? : Read data and draw sphere? Server Time
1 Aug 2024 10:11:49 EDT (-0400)
  Read data and draw sphere?  
From: cutejuly
Date: 26 Nov 2005 09:05:01
Message: <web.43886ab1919621bdcce6fd2b0@news.povray.org>
Hi!

I looked at some answers to read data and to draw spheres in 3D BOX. I am
very interested in that. So, I am trying to do those. But, drawn spheres is
not matched with data as a position. My data file is 'practice.txt'. Also,
format is as following:

100.2 200.3 0
200.1 100.2 0
10.2 23.1 0
etc

For original data(sphere position), I use 'space' instead of 'comma' between
values.

Program is also as following:

#fopen MyFile "practice.txt" read
  #while (defined(MyFile))
    #read (MyFile,Var1,Var2,Var3)

    sphere {
    <Var1, Var3, Var2>, 0.5
    texture {
      pigment { color Yellow }
      }
    }
#end


Is there any problem on the program and/or data file format?

Thank you very much for your help.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.